<template>
	<view class="content">
		<view class="panel_box">
			<view class="seach_box">
				<view class="search">
					<view class="icon_search"><uni-icons :type="icons[0].type" color="#333333" :size="icons[0].size" /></view>
					<view class="search_input">
						<input v-model="params.search_data" @input="seachInfo" placeholder-style="font-size:26rpx" placeholder="关键字搜索" value="" />
					</view>
					<view class="icon_search"></view>
				</view>
				<view class="seach_info" @click="seachInfo">搜索</view>
			</view>
		</view>
		
		
		<view class="panel_box">
			<view class="box_title">
				<view class="title_left">状态分类</view>
			</view>
		</view>
		
		<view class="panel_box">
			<view class="scroll_nav">
				<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0">
					<view class="scroll-view-item_H" v-for="(item,index) in dataStatus" :key="index" v-if="item"  :class="tabSubItem == index ? 'cur' : ''" :data-id="index"  @click="selectTab">
						<view class="scroll-view-title">{{item}}</view>
					</view>
				</scroll-view>
			</view>
		</view>
		
		<view class="panel_box">
			<view class="box_title">
				<view class="title_left">开票列表</view>
			</view>
		</view>
		
		<view class="panel_box" v-for="(item,index) in dataList" :key="index" >
			<view class="panel_item">
				
				<uni-collapse>
					<uni-collapse-item :title="'客户名称：'+item.customer_name" :open="true">
						<view class="box_content">
							<view class="order_list">
								<view class="list_item">
									<!--<view class="item_top">
										<view class="top_left">要货单据：{{item.u8_deliver_num}}</view>-->
										<!--<view class="top_left item_type" v-if="item.inv_code">{{item.inv_code}}</view>-->
										<!--<view class="top_right">{{dataStatus[item.status]}}</view>
									</view>-->
									<view class="order_list_item">
										<view class="product_desc">
											
											
											<!--<view class="product_desc_item" v-if="item.customer_name"><text>客户名称：{{item.customer_name}} </text> </view>-->
											<view class="product_desc_item" v-if="item.customer_code"><text>客户编码：{{item.customer_code}} </text> </view>
											<view class="product_desc_item" v-if="item.deliver_num"><text>发货单号：{{item.deliver_num}} </text> </view>
											<view class="product_desc_item" v-if="item.deliver_date"><text>发货日期：{{item.deliver_date}} </text> </view>
											<!--<view class="product_desc_item" v-if="item.total_money"><text>发票总金额：{{item.total_money}}</text> </view>-->
											<view class="product_desc_item" v-if="item.company_name"><text>开票单位名称：{{item.company_name}}</text> </view>
											<view class="product_desc_item" v-if="item.address"><text>公司注册地址：{{item.address}}</text> </view>
											<view class="product_desc_item" v-if="item.tax_num"><text>税号：{{item.tax_num}}</text></view>
											<view class="product_desc_item" v-if="item.account"><text>开户账号：{{item.account}}</text></view>
											<view class="product_desc_item" v-if="item.bank"><text>开户银行：{{item.bank}}</text></view>									
											<view class="product_desc_item" v-if="item.company_tel"><text>公司电话：{{item.company_tel}}</text></view>		
											<view class="product_desc_item" v-if="item.ivce_address"><text>收票地址：{{item.ivce_address}}</text></view>		
											<view class="product_desc_item" v-if="item.ivce_man"><text>收票联系人：{{item.ivce_man}}</text></view>		
											<view class="product_desc_item" v-if="item.ivce_man_tel"><text>联系人电话：{{item.ivce_man_tel}}</text></view>		
											<view class="product_desc_item" v-if="item.zip_code"><text>邮政编码：{{item.zip_code}}</text></view>
					
										</view>
									</view>
									
								</view>

							</view>
						</view>
						
					</uni-collapse-item>
				</uni-collapse>
				<view class="product_img"  v-if="item.images">
					<view class="product_desc_item">
						<view style="overflow: hidden;margin-top: 20rpx"><u-upload :fileList="item.images" multiple :maxCount="item.images.length"></u-upload></view>
					</view>
				</view>		
				
				<view class="product_total">
					发票总金额：{{item.total_money}}
				</view>
				
				<view class="product_opt">

					<view class="button_box" v-if="item.status==1">
						<button type="default" size="mini" @click="deleteData(item.id)">删除开票</button>				
					</view>
					<view class="button_box" v-if="item.status==1">
						<button type="default" size="mini" @click="addPage(item.id)" >编辑开票</button>				
					</view>
					
				</view>
			</view>
		</view>
		
		<view v-if="dataList.length==0" class="empty_box">
			暂无数据
		</view>
		
		
	</view>
</template>


<script>
	import  parentPage from '@/common/parent-page.js';
	import {index} from './index.js';
	export default {mixins: [parentPage,index]}
</script>



<style>
	@import './index.css';
</style>
